#include <iostream>
using std::cout;
using std::endl;


double division(double x,double y){
    if(y == 0){
        throw "division by zero";
    }
    return x/y;
}

void test0(){
    try{
        cout << division(100,0) << endl;
        cout << "hello" << endl;
    }catch(const char * msg){//catch的是异常的类型
        cout << msg << endl;//做出具体的异常处理
    }
    cout << "over" << endl;
}

int main(void){
    test0();
    return 0;
}
